using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;

namespace CPlatePrintSys.Domain.Models
{
    public class PlateAnnotationInfo
    {
        public int Id { get; set; }
        public string MotherShipNo { get; set; }
        public string StreamShipNo { get; set; }
        public string LotNo { get; set; }
        public string PlateNo { get; set; }
        public string Sequence { get; set; }
        public string CNO { get; set; }
        public string DesignSpecCls { get; set; }
        public double DesignSpecThickness { get; set; }
        public double DesignSpecLength { get; set; }
        public double DesignSpecWidth { get; set; }
        public string SheetConsistentNo { get; set; }
        public string SheetSpecCls { get; set; }
        public double SheetSpecThickness { get; set; }
        public double SheetSpecLength { get; set; }
        public double SheetSpecWidth { get; set; }
        public LayoutMean LayoutMean { get; set; }
        public string MergedInfo { get; set; }
        public string LayoutInfo { get; set; }
        public DateTime? PlanUsedDate { get; set; }
        public bool IsAnnotationGenerated { get; set; }
        public string DesignDrawingPath { get; set; }
        public string AnnotationDrawingPath { get; set; }

        /// <summary>
        /// 数据来源类型（KMACS/AM/CadWin）
        /// </summary>
        public SourceType SourceType { get; set; }

        /// <summary>
        /// 是否被选中（用于UI多选）
        /// </summary>
        [JsonIgnore]
        [NotMapped]
        public bool IsSelected { get; set; }
    }
    public enum LayoutMean
    {
        Unprocessed = 0,
        MirrorLayout = 1,
        MergedLayout = 2
    }

    /// <summary>
    /// 布局显示模式
    /// </summary>
    public enum LayoutMode
    {
        /// <summary>
        /// 镜像布局模式：显示normal和mirror两个控件
        /// </summary>
        MirrorLayout = 0,
        
        /// <summary>
        /// 合并布局模式：只显示normal控件，占据全部区域
        /// </summary>
        MergedLayout = 1
    }

    /// <summary>
    /// 标注信息来源类型
    /// </summary>
    public enum SourceType
    {
        KMACS = 0,
        AM = 1,
        CadWin = 2
    }
} 